=== API changes in 1.13 ===
* Fixing main page display in meta=siteinfo
-* (bug 13128) Add patrolled flag to list=recentchanges
+* (bug 13128) Added patrolled flag to list=recentchanges
* Implemented {bl,ei,iu}redirect (lists links through redirects as well)
-* (bug 13154) Introducing subpages flag to meta=siteinfo&siprop=namespaces
-* (bug 13157) Adding ucuserprefix parameter to list=usercontibs
+* (bug 13154) Introduced subpages flag to meta=siteinfo&siprop=namespaces
+* (bug 13157) Added ucuserprefix parameter to list=usercontibs
+* (bug 12394) Added rctitles parameter to list=recentchanges, making rcid retrieval easier
=== Languages updated in 1.13 ===
*/
public function execute() {
/* Initialize vars */
- $limit = $prop = $namespace = $show = $type = $dir = $start = $end = null;
+ $limit = $prop = $namespace = $titles = $show = $type = $dir = $start = $end = null;
/* Get the parameters of the request. */
extract($this->extractRequestParams());
$this->addWhereRange('rc_timestamp', $dir, $start, $end);
$this->addWhereFld('rc_namespace', $namespace);
$this->addWhereFld('rc_deleted', 0);
+ if(!empty($titles))
+ {
+ $lb = new LinkBatch;
+ foreach($titles as $t)
+ {
+ $obj = Title::newFromText($t);
+ $lb->addObj($obj);
+ if($obj->getNamespace() < 0)
+ {
+ // LinkBatch refuses these, but we need them anyway
+ if(!array_key_exists($obj->getNamespace(), $lb->data))
+ $lb->data[$obj->getNamespace()] = array();
+ $lb->data[$obj->getNamespace()][$obj->getDbKey()] = 1;
+ }
+ }
+ $where = $lb->constructSet('rc', $this->getDb());
+ if($where != '')
+ $this->addWhere($where);
+ }
+
if(!is_null($type))
$this->addWhereFld('rc_type', $this->parseRCType($type));
ApiBase :: PARAM_ISMULTI => true,
ApiBase :: PARAM_TYPE => 'namespace'
),
+ 'titles' => array(
+ ApiBase :: PARAM_ISMULTI => true
+ ),
'prop' => array (
ApiBase :: PARAM_ISMULTI => true,
ApiBase :: PARAM_DFLT => 'title|timestamp|ids',
'end' => 'The timestamp to end enumerating.',
'dir' => 'In which direction to enumerate.',
'namespace' => 'Filter log entries to only this namespace(s)',
+ 'titles' => 'Filter log entries to only these page titles',
'prop' => 'Include additional pieces of information',
'show' => array (
'Show only items that meet this criteria.',